/*
 *  $TEAM_NAME Space Trader
 */
package models;

/**
 * Represents a laser weapon
 * @author bradley
 * @version 1.0
 */
public class Weapon {
	/**
	 * field
	 */
	private int damage;
	
	/**
	 * field
	 */
	private int cost;
	
	/**
	 * field
	 */
	private int minTechLevel;
	
	/**
	 * field
	 */
	private static final Weapon PULSE_MODEL = new Weapon(1, 100, 0);
			
	/**
	 * field
	 */
	private static final Weapon BEAM_MODEL = new Weapon(3, 1000, 0);
	
	/**
	 * no arg constructor
	 */
	public Weapon(){
		this.damage = 0;
	}
	
	/**
	 * Constructor
	 * @param weapon
	 */
	public Weapon(Weapon weapon){
		this(weapon.damage, weapon.cost, weapon.minTechLevel);
	}
	
	/**
	 * Default constructor for weapon
	 * @param damage
	 * @param cost
	 * @param minTechLevel
	 */
	public Weapon(int damage, int cost, int minTechLevel){
		this.damage = damage;
		this.cost = cost;
		this.minTechLevel = minTechLevel;
	}
	
	/**
	 * Gets the damage the laser can do
	 * @return damage
	 */
	public int getDamage(){
		return this.damage;
	}
	
	/**
	 * Gets how much the laser nominally costs
	 * @return cost
	 */
	public int getCost(){
		return this.cost;
	}
	
	/**
	 * Gets the minimum tech level required for a 
	 * system to be able to sell this weapon.
	 * @return minTech
	 */
	public int getMinTechLevel(){
		return this.minTechLevel;
	}

	/**
	 * Returns a new instance of a pulse laser
	 * @return a pulseLaser
	 */
	public static Weapon pulseLaser(){
		return new Weapon(Weapon.PULSE_MODEL);
	}

	/**
	 * Returns a new instance of a beam laser
	 * @return a beamLaser
	 */
	public static Weapon beamLaser(){
		return new Weapon(Weapon.BEAM_MODEL);
	}

	/**
	 * Sets the damage
	 * @param damage
	 */
	public void setDamage(int damage) {
		this.damage = damage;
	}

	/**
	 * Sets the cost
	 * @param cost
	 */
	public void setCost(int cost) {
		this.cost = cost;
	}

	/**
	 * Sets the min tech level
	 * @param minTechLevel
	 */
	public void setMinTechLevel(int minTechLevel) {
		this.minTechLevel = minTechLevel;
	}
	
	/**
	 * to string
	 * @return string
	 */
	public String toString() {
		return "";
	}
}
